<template>
  <div>
    <div class="search-pannel">
      <el-form class="search-form" ref="searchForm" label-position="top" :model="searchData">
        <el-col :span="6">
          <el-form-item label="创建时间" prop="startTime">
            <el-date-picker v-model="searchData.startTime" type="year" value-format="yyyy"></el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="18">
          <div class="button-list">
            <el-button type="primary" @click="onSearch">搜 索</el-button>
            <el-button @click="reset">重 置</el-button>
          </div>
        </el-col>
      </el-form>
    </div>
    <bar-chart ref="statisticalIncome" title="收入统计" :data="data" id="statisticalIncome" />
  </div>
</template>

<script>
import { initTable } from '@/mixins'
import { _getList } from './store'

export default {
  name: 'statisticalIncome',
  components: { 'bar-chart': () => import('@/components/bar-chart/bar-chart') },
  mixins: [initTable],
  data() {
    return {
      searchData: {
        startTime: ''
      },
      initFunc: _getList
    }
  }
}
</script>

<style scoped>
#statisticalIncome {
  height: 400px;
  width: 100%;
}
</style>
